<?php
namespace Admin\Model;
use Think\Model;
class ArticleModel extends Model {
    //自动验证
    protected $_validate = array(
         array('ar_id','require','必须！',self::EXISTS_VALIDATE ),
         array('ar_tittle','require','文章标题必须！',self::EXISTS_VALIDATE ),
         array('ar_video','require','视频地址必须！',self::EXISTS_VALIDATE ),
         array('ar_status','require','文章状态必须！',self::EXISTS_VALIDATE ),
         array('user_id','require','文章发布人id必须！',self::EXISTS_VALIDATE ),
         array('arc_id','require','文章分类必须！',self::EXISTS_VALIDATE ),
         array('arco_id','require','所属栏目id必须！',self::EXISTS_VALIDATE ),
         array('art_id','require','必须！',self::EXISTS_VALIDATE ),
         array('ar_click_num','require','点击次数必须！',self::EXISTS_VALIDATE ),
         array('ar_content','require','文章主体必须！',self::EXISTS_VALIDATE ),
         array('ar_order','require','排序必须！',self::EXISTS_VALIDATE ),
         array('ar_createtime','require','文章发布时间必须！',self::EXISTS_VALIDATE ),
         array('ar_updatetime','require','更新时间必须！',self::EXISTS_VALIDATE ),
         array('ar_createip','require','发布时IP必须！',self::EXISTS_VALIDATE ),
         array('ar_updateip','require','更新时ip必须！',self::EXISTS_VALIDATE ),
         array('ar_plate','require','所属板块必须！',self::EXISTS_VALIDATE ),
         array('ar_abstract','require','文章摘要必须！',self::EXISTS_VALIDATE ),
         array('ar_thumbnail','require','文章缩略图必须！',self::EXISTS_VALIDATE ),
         array('ar_top','require','置顶必须！',self::EXISTS_VALIDATE ),
         array('ar_recommend','require',' 推荐必须！',self::EXISTS_VALIDATE ),
         array('ar_score','require','评分必须！',self::EXISTS_VALIDATE ),
         array('ar_commit_num','require','评论次数必须！',self::EXISTS_VALIDATE ),
         array('ar_isfee','require','是否收费必须！',self::EXISTS_VALIDATE ),
         array('ar_label','require','标签必须！',self::EXISTS_VALIDATE ),
         array('ar_enclosure','require','附件必须！',self::EXISTS_VALIDATE ),
         array('ar_keywords','require','关键词必须！',self::EXISTS_VALIDATE ),
         array('ar_from','require','文章来源必须！',self::EXISTS_VALIDATE ),
         array('ar_username','require','必须！',self::EXISTS_VALIDATE ),
         array('ar_isbanner','require','是否为banner必须！',self::EXISTS_VALIDATE ),
         array('ar_begintime','require','开始时间必须！',self::EXISTS_VALIDATE ),
         array('ar_endtime','require','结束时间必须！',self::EXISTS_VALIDATE ),
         
    );
    // 自动填充设置
    protected $_auto = array(
         array('ar_createtime','time',self:: MODEL_INSERT,'function'),
         array('ar_updatetime','time',self:: MODEL_INSERT,'function'),
         array('ar_updatetime','time',self:: MODEL_UPDATE,'function'),
         
    );
}